/*
 * Copyright (c) 2008-2013 Haulmont. All rights reserved.
 * Use is subject to license terms, see http://www.cuba-platform.com/license for details.
 */

package com.haulmont.asu.entity;

import com.haulmont.chile.core.annotations.NamePattern;
import com.haulmont.cuba.core.entity.StandardEntity;
import com.haulmont.cuba.core.entity.annotation.Listeners;

import javax.persistence.*;

/**
 * Author: Sergey42
 * Date: 14.10.13 12:16
 */
@Table(name = "EXT_DIPLOMA_PROJECT")
@Entity(name = "ext$DiplomaProject")
@NamePattern("%s|name")
@Listeners({"com.haulmont.asu.core.listener.DiplomaProjectListener"})
public class DiplomaProject extends StandardEntity {

    private static final long serialVersionUID = -5579149164203091100L;

    @ManyToOne
    @JoinColumn(name = "THEME_ID")
    protected ProjectTheme projectTheme;

    @OneToOne
    @JoinColumn(name = "DIPLOMA_STUDENT_ID")
    protected DiplomaStudent diplomaStudent;

    @ManyToOne
    @JoinColumn(name = "DIPLOMA_LEADER_ID")
    protected DiplomaLeader diplomaLeader;

    @Column(name = "NAME", length = 200)
    protected String name;

    @ManyToOne
    @JoinColumn(name = "ADD_CONSULTANT_ID")
    protected CathedralConsultant addConsultant;

    @ManyToOne
    @JoinColumn(name = "PO_CONSULTANT_ID")
    protected CathedralConsultant productionOrganizationConsultant;

    @ManyToOne
    @JoinColumn(name = "LS_CONSULTANT_ID")
    protected CathedralConsultant lifeSecurityConsultant;

    public ProjectTheme getProjectTheme() {
        return projectTheme;
    }

    public void setProjectTheme(ProjectTheme projectTheme) {
        this.projectTheme = projectTheme;
    }

    public DiplomaLeader getDiplomaLeader() {
        return diplomaLeader;
    }

    public void setDiplomaLeader(DiplomaLeader diplomaLeader) {
        this.diplomaLeader = diplomaLeader;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public CathedralConsultant getProductionOrganizationConsultant() {
        return productionOrganizationConsultant;
    }

    public void setProductionOrganizationConsultant(CathedralConsultant productionOrganizationConsultant) {
        this.productionOrganizationConsultant = productionOrganizationConsultant;
    }

    public CathedralConsultant getLifeSecurityConsultant() {
        return lifeSecurityConsultant;
    }

    public void setLifeSecurityConsultant(CathedralConsultant lifeSecurityConsultant) {
        this.lifeSecurityConsultant = lifeSecurityConsultant;
    }

    public DiplomaStudent getDiplomaStudent() {
        return diplomaStudent;
    }

    public void setDiplomaStudent(DiplomaStudent diplomaStudent) {
        this.diplomaStudent = diplomaStudent;
    }

    public CathedralConsultant getAddConsultant() {
        return addConsultant;
    }

    public void setAddConsultant(CathedralConsultant addConsultant) {
        this.addConsultant = addConsultant;
    }
}
